/**
 * Created by 张淑曼 on 2018/12/14.
 */
bdoption = {
    visualMap: {
        show: false,
        min: 0,
        max: 200,
        left: 'left',
        top: 'bottom',
        text: ['高', '低'], // 文本，默认为数值文本
        calculable: true,
        seriesIndex: [1],
        inRange: {
            color: ['#3B76F6', '#3B76F6'] // 浅蓝

        }
    },
    geo: {
        show: true,
        map: mapName,
        label: {
            normal: {
                show: true,
                textStyle: {
                    fontSize: 32,
                    color: '#fff'
                }
            },
            emphasis: {
                show: false,
            }
        },
        roam: false,
        itemStyle: {
            normal: {
                areaColor: '#2558C0',
                borderColor: '#04C9C5',
                shadowColor: '#000',
                shadowBlur: 50,
                borderWidth:5,
            },
            emphasis: {
                areaColor: '#2B91B7',
            }
        }
    },
    series: [{
        name: '散点',
        type: 'scatter',
        coordinateSystem: 'geo',
        data: convertData(data),
        symbolSize: 1,
        label: {
            normal: {
                formatter: '{b}',
                position: 'right',
                show: false
            },
            emphasis: {
                show: true
            }
        },
        itemStyle: {
            normal: {
                color: '#05C3F9'
            }
        }
    },
        {
            type: 'map',
            map: mapName,
            geoIndex: 1,
            aspectScale: 0.75, //长宽比
            showLegendSymbol: false, // 存在legend时显示
            label: {
                normal: {
                    show: true,
                    textStyle: {
                        fontSize: 32,
                        color: '#fff'
                    }
                },
                emphasis: {
                    show: false,
                }
            },
            roam: false,
            itemStyle: {
                normal: {
                    areaColor: '#2558C0',
                    borderColor: '#04C9C5',
                    borderWidth: 4
                },
                emphasis: {
                    areaColor: '#2B91B7'
                }
            },
            animation: false,
            data: data
        },
        {
            name: '点',
            type: 'scatter',
            coordinateSystem: 'geo',
            symbol: symbolType, //气泡 圆circle  气泡pin
            symbolSize: function (val) {
                var a = (maxSize4Pin - minSize4Pin) / (max - min);
                var b = minSize4Pin - a * min;
                b = maxSize4Pin - a * max;
                return a * val[2] + b;
            },
            symbolOffset:[-50,-10],
            label: {
                normal: {
                    show: true,
                    textStyle: {
                        color: '#fff',
                        fontSize: 26,
                    },
                    formatter: function (params) {
                        return params.value[2]
                    },

                }
            },
            itemStyle: {
                normal: {
                    color: symbolColor, //标志颜色
                }
            },
            zlevel: 6,
            data: convertData(data),
        },


    ]
};